#include "xinxin_fbmem_bmp_deconfig.h"
#include "xinxin_sysimageblt.h"
static int xinxin_disp_bmp_logo(struct fb_info *info, int rotate, int y,unsigned int n)
{
	void (*back_imageblit) (struct fb_info *info, const struct fb_image *image);
	struct fb_image image;
	uint8_t *bmp_logo_data;

	if(bmp_decode(&image.width,&image.height,&image.depth,&bmp_logo_data))
	{
		ioremap_del();
		printk("Logo BMP File decode find!\n");
		return 0;
	}
	image.data = bmp_logo_data;

	// if (fb_logo.needs_cmapreset)
	// 	fb_set_logocmap(info, &bmp_logo);

	printk("logo file data :width=%d,height=%d\n",image.width,image.height);


#if 1 /*LOGO是否居中*/
	image.dx = (info->var.xres/2) - (image.width/2);
	image.dy = (info->var.yres/2) - (image.height/2);
#else
	image.dx = 0;
	image.dy = y;
#endif
	/*调用自定义的画图函数 完成后链接之前的函数*/
	back_imageblit = info->fbops->fb_imageblit;
	info->fbops->fb_imageblit = xinxin_imageblit;
	fb_do_show_logo(info, &image, rotate, n);
	info->fbops->fb_imageblit = back_imageblit;

	ioremap_del();

	return image.height;
}